package com.zz.parkingsystem.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 订单项表
 * @TableName t_order_item
 */
@Data
public class OrderItem implements Serializable {
    /**
     * 订单项id
     */
    private Integer oiId;

    /**
     * 资金流水表编号
     */
    private Integer amoId;

    /**
     * 订单流水号
     */
    private String oiNo;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 车辆id
     */
    private Integer carId;

    /**
     * 泊位id
     */
    private Integer pkId;

    /**
     * 路段id
     */
    private Integer secId;

    /**
     * 驶入时间
     */
    private Date oiStartTime;

    /**
     * leave时间
     */
    private Date oiEndTime;

    /**
     * 订单金额
     */
    private BigDecimal oiAmount;

    /**
     * 图片1
     */
    private String oiImgone;

    /**
     * 图片2
     */
    private String oiImgtwo;

    /**
     * 图片3
     */
    private String oiImgthree;

    /**
     * 预留varchar字段
     */
    private String reservedVar;

    /**
     * 预留int字段
     */
    private Integer reservedInt;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderItem other = (OrderItem) that;
        return (this.getOiId() == null ? other.getOiId() == null : this.getOiId().equals(other.getOiId()))
            && (this.getAmoId() == null ? other.getAmoId() == null : this.getAmoId().equals(other.getAmoId()))
            && (this.getOiNo() == null ? other.getOiNo() == null : this.getOiNo().equals(other.getOiNo()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getCarId() == null ? other.getCarId() == null : this.getCarId().equals(other.getCarId()))
            && (this.getPkId() == null ? other.getPkId() == null : this.getPkId().equals(other.getPkId()))
            && (this.getSecId() == null ? other.getSecId() == null : this.getSecId().equals(other.getSecId()))
            && (this.getOiStartTime() == null ? other.getOiStartTime() == null : this.getOiStartTime().equals(other.getOiStartTime()))
            && (this.getOiEndTime() == null ? other.getOiEndTime() == null : this.getOiEndTime().equals(other.getOiEndTime()))
            && (this.getOiAmount() == null ? other.getOiAmount() == null : this.getOiAmount().equals(other.getOiAmount()))
            && (this.getOiImgone() == null ? other.getOiImgone() == null : this.getOiImgone().equals(other.getOiImgone()))
            && (this.getOiImgtwo() == null ? other.getOiImgtwo() == null : this.getOiImgtwo().equals(other.getOiImgtwo()))
            && (this.getOiImgthree() == null ? other.getOiImgthree() == null : this.getOiImgthree().equals(other.getOiImgthree()))
            && (this.getReservedVar() == null ? other.getReservedVar() == null : this.getReservedVar().equals(other.getReservedVar()))
            && (this.getReservedInt() == null ? other.getReservedInt() == null : this.getReservedInt().equals(other.getReservedInt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOiId() == null) ? 0 : getOiId().hashCode());
        result = prime * result + ((getAmoId() == null) ? 0 : getAmoId().hashCode());
        result = prime * result + ((getOiNo() == null) ? 0 : getOiNo().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getCarId() == null) ? 0 : getCarId().hashCode());
        result = prime * result + ((getPkId() == null) ? 0 : getPkId().hashCode());
        result = prime * result + ((getSecId() == null) ? 0 : getSecId().hashCode());
        result = prime * result + ((getOiStartTime() == null) ? 0 : getOiStartTime().hashCode());
        result = prime * result + ((getOiEndTime() == null) ? 0 : getOiEndTime().hashCode());
        result = prime * result + ((getOiAmount() == null) ? 0 : getOiAmount().hashCode());
        result = prime * result + ((getOiImgone() == null) ? 0 : getOiImgone().hashCode());
        result = prime * result + ((getOiImgtwo() == null) ? 0 : getOiImgtwo().hashCode());
        result = prime * result + ((getOiImgthree() == null) ? 0 : getOiImgthree().hashCode());
        result = prime * result + ((getReservedVar() == null) ? 0 : getReservedVar().hashCode());
        result = prime * result + ((getReservedInt() == null) ? 0 : getReservedInt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", oiId=").append(oiId);
        sb.append(", amoId=").append(amoId);
        sb.append(", oiNo=").append(oiNo);
        sb.append(", userId=").append(userId);
        sb.append(", carId=").append(carId);
        sb.append(", pkId=").append(pkId);
        sb.append(", secId=").append(secId);
        sb.append(", oiStartTime=").append(oiStartTime);
        sb.append(", oiEndTime=").append(oiEndTime);
        sb.append(", oiAmount=").append(oiAmount);
        sb.append(", oiImgone=").append(oiImgone);
        sb.append(", oiImgtwo=").append(oiImgtwo);
        sb.append(", oiImgthree=").append(oiImgthree);
        sb.append(", reservedVar=").append(reservedVar);
        sb.append(", reservedInt=").append(reservedInt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}